package com.ks.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @program: ks
 * @description: 配置生效controller测试
 * @author: Liu Weidong
 * @create: 2023-06-26 21:45
 **/
@RestController
@RefreshScope
public class ConfigController {

    @Value("${name}")
    private String codeUrl;


    @Value("${age}")
    private String commonName;

    @GetMapping("/get")
    public String getConfig(){
        return codeUrl + " " + commonName;
    }

}
